-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control astro dev
Output with --verbosity
Flag
#1770
Draft
schnie
wants to merge
5
commits into
main
Choose a base branch
from
feature/minimize-default-dev-output
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
schnie
force-pushed
the
feature/minimize-default-dev-output
branch
4 times, most recently
from
December 20, 2024 04:25
dd00790
to
bd1590d
Compare
schnie
force-pushed
the
feature/minimize-default-dev-output
branch
from
December 20, 2024 16:11
bd1590d
to
4896922
Compare
schnie
force-pushed
the
feature/minimize-default-dev-output
branch
from
December 20, 2024 18:47
b295a68
to
6fa7960
Compare
schnie
commented
Dec 20, 2024
Comment on lines
-197
to
-212
// Get project containers | ||
psInfo, err := d.composeService.Ps(context.Background(), d.projectName, api.PsOptions{ | ||
All: true, | ||
}) | ||
if err != nil { | ||
return errors.Wrap(err, composeCreateErrMsg) | ||
} | ||
if len(psInfo) > 0 { | ||
// Ensure project is not already running | ||
for i := range psInfo { | ||
if checkServiceState(psInfo[i].State, dockerStateUp) { | ||
return errors.New("cannot start, project already running") | ||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem necessary to throw an error if the project is already started. Let's just make sure the image is updated and started, then re-print the status info.
schnie
changed the title
Hides most build and start output behind verbosity level
Minimize Dec 20, 2024
astro dev
Output with --verbosity
Flag
schnie
changed the title
Minimize
Control Dec 20, 2024
astro dev
Output with --verbosity
Flagastro dev
Output with --verbosity
Flag
schnie
force-pushed
the
feature/minimize-default-dev-output
branch
from
December 20, 2024 19:18
ca69f47
to
9e815ff
Compare
schnie
force-pushed
the
feature/minimize-default-dev-output
branch
from
December 20, 2024 19:43
9e815ff
to
0250f96
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR cleans up the output on the
astro dev start/stop/kill/restart
commands. Today these commands output a lot of information that is mostly meaningless or unhelpful, distracting from the experience. A new user whose just downloaded the CLI should be focused on getting something running in Airflow, not thinking about containers and docker, etc yet.In this PR, we've suppressed the Image Build and Compose output for standard usage without any additional flags. This provides a nice, clean output with information about what's happening, but not every single detail. We're re-using the spinner we introduced recently for the runtime initialization messaging.
If users are interested in the full output, we've moved it behind the
--verbosity (debug|trace)
flag. For example, if you are troubleshooting something deep in the stack for some reasonastro dev start --verbosity debug
will show the output, just as it did before this change.If the build phase encounters an error, which is probably a somewhat common occurrence in the wild, the
stdout
andstderr
streams will be printed out, along with the error message.🎟 Issue(s)
Related to https://github.com/astronomer/astro/issues/26133
🧪 Functional Testing
📸 Screenshots
Default experience
--verbosity debug|trace
experienceError on Build Default Experience
📋 Checklist
make test
before taking out of draftmake lint
before taking out of draft